# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
pkgname=spacefm
pkgver=1.0.6
pkgrel=3
pkgdesc="Multi-panel tabbed file manager (GTK2 version)"
arch="all"
url="https://ignorantguru.github.io/spacefm/"
license="GPL-3.0-or-later"
depends="bash"
makedepends="intltool gettext-dev gtk+3.0-dev eudev-dev ffmpegthumbnailer-dev linux-headers"
subpackages="
	$pkgname-lang
	$pkgname-doc
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/IgnorantGuru/spacefm/archive/$pkgver.tar.gz
	spacefm-include-sysmacros.patch
	gcc-10.patch
	"

replaces="$pkganme-gtk3"

prepare() {
	default_prepare
	update_config_guess
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-gtk3 \
		-disable-pixmaps
	make
}

package() {
	make -j1 DESTDIR="$pkgdir" install
}

lang() {
	replaces="$pkgname-gtk3-lang"
	default_lang
}

doc() {
	replaces="$pkgname-gtk3-doc"
	default_doc
}

sha512sums="37fc0dd31f02158502f592415b4c375ee49560af6f03d75b035d7c6c45bdc47064bba1ae8987b4cc8be2e02b3dfcdc17ec760411975e7b5f74343a2293fb2c8c  spacefm-1.0.6.tar.gz
d7b33441700141dc956df54f03393c02783fc5188b82883401d4781c52fb383089af5ed3b3645b686078a6ac06d3b3e269f7ee5ab3f4d1416ebb0141fbaa7b7e  spacefm-include-sysmacros.patch
343f149b96655ffe930e2ea76e78fab407904a893669b6ca71ed1797292c81750782a91db589f87ef8951601b90179f7b83c900d0039276578624b64b2661dd1  gcc-10.patch"
